<template>
    <div>
        <h1>{{msg}}</h1>
        <button @click="btnClick">我是按钮</button>
    </div>
</template>

<script>
    export default {
        name: "Header",
        data(){
            return {
                msg:"我是head组件"
            }
        },
        methods:{
            btnClick(){
                alert("点我干嘛")
            }
        }
    }
</script>

<style scoped>

</style>